//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __CALIBRATE_H__
#define __CALIBRATE_H__

class CCalibration
{
public:
    CCalibration(Boolean bEnable = FALSE): m_bEnable(bEnable);
    ~CCalibration();
    ECode Initialize();

private:
    Boolean m_bEnable;
    Boolean m_bSetting;
    PVoid m_hEvent;
};

CCalibration::~CCalibration()
{
    if (NULL != m_hEvent) {
        CloseHandle(m_hEvent);
        m_hEvent = NULL;
    }
}

ECode CCalibration::Initialize()
{
    // TODO;
}

ECode CCalibration::GetDisplayPoint(Int32 x, Int32 y, Int32 * pX, Int32 *pY)
{
    // TODO;
}









//#define _DBGCALIBRATE

typedef struct {
    int x;//Raw Coordinate
    int y;//Raw
    int X;//LCD Point
    int Y;
}RefPoint;

typedef struct {
    int x1, y1;
    int X1, Y1;
    int x2, y2;
    int X2, Y2;
}CalibrationInfo;

void GetDisplayPoint(int x, int y, int *pX, int *pY);
int SetCalibrationMatrix(int n, RefPoint P[]);

#endif//__CALIBRATE_H__
